package com.eshop.modules.activity.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.NotNull;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("store_coupon_issue")
public class StoreCouponIssue extends BaseDomain
{
    private static final long serialVersionUID = 1L;
    @TableId
    @ApiModelProperty("优惠券前台领取ID")
    private Integer id;
    @ApiModelProperty("前台显示优惠券名称")
    private String cname;
    @ApiModelProperty("优惠券ID")
    private Integer cid;
    @ApiModelProperty("优惠券类型 0-通用 1-商品券")
    private Integer ctype;
    @NotNull(message = "请选择开启时间")
    @ApiModelProperty("优惠券领取开启时间")
    private Date startTime;
    @NotNull(message = "请选择结束时间")
    @ApiModelProperty("优惠券领取结束时间")
    private Date endTime;
    @ApiModelProperty("优惠券领取数量")
    private Integer totalCount;
    @ApiModelProperty("优惠券剩余领取数量")
    private Integer remainCount;
    @ApiModelProperty("是否无限张数1：是 0：否")
    private Integer isPermanent;
    @ApiModelProperty("前台领取优惠券状态1 正常 0 未开启 -1 已无效")
    private Integer status;
    
    public void copy(final StoreCouponIssue source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Integer getId() {
        return this.id;
    }
    
    public String getCname() {
        return this.cname;
    }
    
    public Integer getCid() {
        return this.cid;
    }
    
    public Integer getCtype() {
        return this.ctype;
    }
    
    public Date getStartTime() {
        return this.startTime;
    }
    
    public Date getEndTime() {
        return this.endTime;
    }
    
    public Integer getTotalCount() {
        return this.totalCount;
    }
    
    public Integer getRemainCount() {
        return this.remainCount;
    }
    
    public Integer getIsPermanent() {
        return this.isPermanent;
    }
    
    public Integer getStatus() {
        return this.status;
    }
    
    public void setId(final Integer id) {
        this.id = id;
    }
    
    public void setCname(final String cname) {
        this.cname = cname;
    }
    
    public void setCid(final Integer cid) {
        this.cid = cid;
    }
    
    public void setCtype(final Integer ctype) {
        this.ctype = ctype;
    }
    
    public void setStartTime(final Date startTime) {
        this.startTime = startTime;
    }
    
    public void setEndTime(final Date endTime) {
        this.endTime = endTime;
    }
    
    public void setTotalCount(final Integer totalCount) {
        this.totalCount = totalCount;
    }
    
    public void setRemainCount(final Integer remainCount) {
        this.remainCount = remainCount;
    }
    
    public void setIsPermanent(final Integer isPermanent) {
        this.isPermanent = isPermanent;
    }
    
    public void setStatus(final Integer status) {
        this.status = status;
    }
    
    public String toString() {
        return "StoreCouponIssue(id=" + this.getId() + ", cname=" + this.getCname() + ", cid=" + this.getCid() + ", ctype=" + this.getCtype() + ", startTime=" + this.getStartTime() + ", endTime=" + this.getEndTime() + ", totalCount=" + this.getTotalCount() + ", remainCount=" + this.getRemainCount() + ", isPermanent=" + this.getIsPermanent() + ", status=" + this.getStatus() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof StoreCouponIssue)) {
            return false;
        }
        final StoreCouponIssue other = (StoreCouponIssue)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$cid = this.getCid();
        final Object other$cid = other.getCid();
        Label_0112: {
            if (this$cid == null) {
                if (other$cid == null) {
                    break Label_0112;
                }
            }
            else if (this$cid.equals(other$cid)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$ctype = this.getCtype();
        final Object other$ctype = other.getCtype();
        Label_0149: {
            if (this$ctype == null) {
                if (other$ctype == null) {
                    break Label_0149;
                }
            }
            else if (this$ctype.equals(other$ctype)) {
                break Label_0149;
            }
            return false;
        }
        final Object this$totalCount = this.getTotalCount();
        final Object other$totalCount = other.getTotalCount();
        Label_0186: {
            if (this$totalCount == null) {
                if (other$totalCount == null) {
                    break Label_0186;
                }
            }
            else if (this$totalCount.equals(other$totalCount)) {
                break Label_0186;
            }
            return false;
        }
        final Object this$remainCount = this.getRemainCount();
        final Object other$remainCount = other.getRemainCount();
        Label_0223: {
            if (this$remainCount == null) {
                if (other$remainCount == null) {
                    break Label_0223;
                }
            }
            else if (this$remainCount.equals(other$remainCount)) {
                break Label_0223;
            }
            return false;
        }
        final Object this$isPermanent = this.getIsPermanent();
        final Object other$isPermanent = other.getIsPermanent();
        Label_0260: {
            if (this$isPermanent == null) {
                if (other$isPermanent == null) {
                    break Label_0260;
                }
            }
            else if (this$isPermanent.equals(other$isPermanent)) {
                break Label_0260;
            }
            return false;
        }
        final Object this$status = this.getStatus();
        final Object other$status = other.getStatus();
        Label_0297: {
            if (this$status == null) {
                if (other$status == null) {
                    break Label_0297;
                }
            }
            else if (this$status.equals(other$status)) {
                break Label_0297;
            }
            return false;
        }
        final Object this$cname = this.getCname();
        final Object other$cname = other.getCname();
        Label_0334: {
            if (this$cname == null) {
                if (other$cname == null) {
                    break Label_0334;
                }
            }
            else if (this$cname.equals(other$cname)) {
                break Label_0334;
            }
            return false;
        }
        final Object this$startTime = this.getStartTime();
        final Object other$startTime = other.getStartTime();
        Label_0371: {
            if (this$startTime == null) {
                if (other$startTime == null) {
                    break Label_0371;
                }
            }
            else if (this$startTime.equals(other$startTime)) {
                break Label_0371;
            }
            return false;
        }
        final Object this$endTime = this.getEndTime();
        final Object other$endTime = other.getEndTime();
        if (this$endTime == null) {
            if (other$endTime == null) {
                return true;
            }
        }
        else if (this$endTime.equals(other$endTime)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof StoreCouponIssue;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $cid = this.getCid();
        result = result * 59 + (($cid == null) ? 43 : $cid.hashCode());
        final Object $ctype = this.getCtype();
        result = result * 59 + (($ctype == null) ? 43 : $ctype.hashCode());
        final Object $totalCount = this.getTotalCount();
        result = result * 59 + (($totalCount == null) ? 43 : $totalCount.hashCode());
        final Object $remainCount = this.getRemainCount();
        result = result * 59 + (($remainCount == null) ? 43 : $remainCount.hashCode());
        final Object $isPermanent = this.getIsPermanent();
        result = result * 59 + (($isPermanent == null) ? 43 : $isPermanent.hashCode());
        final Object $status = this.getStatus();
        result = result * 59 + (($status == null) ? 43 : $status.hashCode());
        final Object $cname = this.getCname();
        result = result * 59 + (($cname == null) ? 43 : $cname.hashCode());
        final Object $startTime = this.getStartTime();
        result = result * 59 + (($startTime == null) ? 43 : $startTime.hashCode());
        final Object $endTime = this.getEndTime();
        result = result * 59 + (($endTime == null) ? 43 : $endTime.hashCode());
        return result;
    }
}
